import axios from "@/axios/axios.js";

// 权限管理

/**
 * 角色列表
 * @returns 
 */
export const roles_Roles=()=>axios.get('roles')

/**
 * 
 * @param { *} roleId 
 * @param {* } rids 
 * @returns 
 */
export const roles_Post=(roleId,obj)=>axios.post(`roles/${roleId}/rights`,obj)

/**
 * 
 * @param {*} obj 
 * @returns 
 */
export const roles_roles=(obj)=>axios.post('roles',obj)

/**
 * 
 * @param {*} id 
 * @returns 
 */
export const roles_roles_sc=(id)=>axios.delete(`roles/${id}`)

/**
 * 
 * @param {*} obj 
 * @returns 
 */
export const roles_roles_put=(obj)=>axios.put(`roles/${obj.id}`,obj)

/**
 * 
 * @param {*} roleId 
 * @param {*} rightId 
 * @returns 
 */
export const roles_roles_delete=(roleId,rightId)=>axios.delete(`roles/${roleId}/rights/${rightId}`)

